Skip to content

Conversation

@pengying
Copy link
Contributor

@pengying pengying commented Jan 24, 2026

Grid API SDK Configuration

  • Add .stainless/stainless.yml and workspace.json for SDK generation
  • Add AllErrors schema to properly handle error types
  • Replace Error schema references with GridError
  • Fix phone number format in UltimateBeneficialOwner to include '+' prefix
  • Update .redocly.lint-ignore.yaml with additional rule exceptions
  • Fix internal_accounts schema reference path

@greptile-apps
Copy link

greptile-apps bot commented Jan 24, 2026

Greptile Overview

Greptile Summary

This PR adds Stainless SDK configuration for generating TypeScript and Kotlin SDKs and performs several OpenAPI spec cleanups:

  • Added .stainless/stainless.yml with comprehensive SDK generation config mapping all API resources, models, and methods
  • Added .stainless/workspace.json to configure SDK output paths
  • Introduced AllErrors union schema to consolidate all HTTP error types (400, 401, 403, 404, 409, 412, 424, 500, 501) for Stainless SDK error handling
  • Consolidated duplicate GridError schema definitions by removing redundant declaration
  • Fixed phoneNumber example in UltimateBeneficialOwner to include '+' prefix matching E.164 format
  • Corrected internal accounts schema path from users/InternalAccount.yaml to customers/InternalAccount.yaml
  • Updated error response reference from Error to GridError in customer DELETE endpoint
  • Added lint exceptions for new AllErrors schema and quote required properties

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • All changes are well-structured configuration and schema cleanup work with no logic changes. The Stainless config follows standard patterns, schema fixes correct existing issues, and all error references are properly updated throughout the spec.
  • No files require special attention

Important Files Changed

Filename Overview
.stainless/stainless.yml Added Stainless SDK configuration for TypeScript and Kotlin SDK generation with comprehensive resource definitions
openapi/components/schemas/customers/UltimateBeneficialOwner.yaml Fixed phoneNumber example to include '+' prefix, matching E.164 format requirements
openapi/openapi.yaml Added AllErrors union schema referencing all error types (400, 401, 403, 404, 409, 412, 424, 500, 501)
openapi/paths/internal-accounts/internal_accounts.yaml Fixed schema reference path from users/InternalAccount.yaml to customers/InternalAccount.yaml

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant Stainless as Stainless SDK Generator
    participant OpenAPI as OpenAPI Spec
    participant SDK as Generated SDK
    participant API as Grid API
    
    Note over Dev,OpenAPI: SDK Configuration Setup
    Dev->>OpenAPI: Add AllErrors union schema
    Dev->>OpenAPI: Update Error → GridError references
    Dev->>OpenAPI: Fix schema paths & examples
    Dev->>Stainless: Create stainless.yml config
    Dev->>Stainless: Create workspace.json
    
    Note over Stainless,SDK: SDK Generation Process
    Stainless->>OpenAPI: Read mintlify/openapi.yaml
    Stainless->>Stainless: Parse AllErrors schema
    Stainless->>Stainless: Split errors by enum property (code)
    Stainless->>Stainless: Map resources & methods
    Stainless->>SDK: Generate TypeScript SDK
    Stainless->>SDK: Generate Kotlin SDK
    
    Note over SDK,API: SDK Usage Flow
    SDK->>API: Make API request with BasicAuth
    API-->>SDK: Return response or error
    SDK->>SDK: Handle error using discriminated union
    SDK-->>Dev: Typed error with status & code
Loading

@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch from 6432728 to e5749d2 Compare January 27, 2026 01:29
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch from 21d334e to f90918a Compare January 27, 2026 01:29
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch from e5749d2 to a27f6e6 Compare January 27, 2026 05:19
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch from f90918a to c6b215b Compare January 27, 2026 05:19
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split branch from a27f6e6 to a1379cd Compare January 27, 2026 05:24
- Add .stainless/stainless.yml and workspace.json
- Add AllErrors schema and remove retry quotes endpoint
- Update .redocly.lint-ignore.yaml
- Fix UltimateBeneficialOwner phone format
- Fix internal_accounts ref path
@pengying pengying force-pushed the 01-24-feat_flatten_lightningexternalaccountinfo_schema_split_split_split_split_split branch from c6b215b to 6464d8a Compare January 27, 2026 05:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants